In an internal combustion engine such as an automobile engine, the crank angle is acquired based on a crank signal and a cam signal. Based on the crank angle, fuel injection and ignition are performed (refer to Japanese Laid-Open Patent Publication No. 8-144825).
The crank signal is output by a crank position sensor located in the vicinity of a crank rotor attached to the crankshaft as the crankshaft rotates, for example, at every 30° of crank angle. The profile of the crank rotor is shaped such that the crank signal at equal intervals is output from the crank position sensor. On the other hand, the cam signal is output by a cam position sensor located in the vicinity of a cam rotor attached to a camshaft as the camshaft rotates at every 360° rotation of the camshaft (720° of crank angle). The profile of the cam rotor is shaped such that the cam signal is output from the cam position sensor. The output intervals of the cam signal are set longer than the output intervals of the crank signal (at every 30° CA). This is because the cam signal is used only for distinguishing the cylinders, and does not need to be output at a short interval such as 30° CA like the crank signal.
When acquiring the crank angle based on the crank signal and the cam signal, a counter that is incremented, for example, at every output of the crank signal is used. When the crankshaft and the camshaft are rotated by a certain amount by a starter after starting of the engine is initiated, and the crank angle is first determined to be 0° based on the crank signal and the cam signal, the counter is set to 0. Thereafter, the counter is incremented at every output of the crank signal. When one cycle of the engine that starts from 0° of crank angle is complete, in other words, when the crank angle reaches 720° and the counter has a value corresponding to 720° CA, the counter is set back to 0. Therefore, from 0° CA to 720° CA, the counter is increased by 1 at every 30° of crank angle, and the crank angle is acquired based on the counter.
To improve the starting performance of an internal combustion engine, it is preferable that injection and ignition are started at an early stage after starting of the engine is initiated. Therefore, it may be configured that when the operation of the engine is terminated (when the crankshaft stops), the value of the counter is stored, and in the subsequent starting of the engine, the stored counter value is used as the initial value of the counter, so that the counter value is continuously used in the engine operations before and after the stop of the engine. Such transfer of the counter value permits the crank angle to be acquired immediately after the starting of the engine is initiated. Based on the crank angle, fuel injection and ignition can be executed at an early stage after the starting of the engine is initiated.
However, when the engine is stopped, after the stop of fuel injection and ignition, the engine speed is gradually reduced by rotational resistance due to the pressure in combustion chambers in the compression stroke. Finally, the engine rotation is stopped after the engine is rotated in the reverse direction by the pressure in the combustion chambers. Thus, if the counter is simply incremented at every output of the crank signal, a discrepancy occurs between the counter and the actual crank angle after the reverse rotation takes place. This is because after the reverse rotation, the counter is incremented despite the fact that the actual crank angle is reduced at every output of the crank signal. Therefore, when reverse rotation occurs, the value of the counter when the crankshaft stops does not correspond to the actual crank angle unless a measure is taken to match the counter value with the actual crank angle.
To take such a measure, the occurrence of reverse rotation must be detected. Since the output patterns of the crank signal and the cam signal are substantially the same during the forward rotation and the reverse rotation of the engine, the occurrence of reverse rotation can be hardly detected based on such output patterns. Hence, the technique disclosed in Japanese Examined Patent Publication No. 6-50107 may be used to detect the occurrence of reverse rotation of an internal combustion engine. Japanese Examined Patent Publication No. 6-50107 discloses the technique in which two crank position sensors are provided in such a manner that, during forward rotation of the engine, the two crank position sensors output crank signals at different timings. In this case, the state of discrepancy between the crank signals from the two sensors is designed be different between the forward rotation and the reverse rotation of the engine. Thus, based on the state of discrepancy, the occurrence of reverse rotation is detected.
If a configuration is applied in which the occurrence of reverse rotation of an internal combustion engine is detected by using the technique disclosed in Japanese Examined Patent Publication No. 6-50107 as described above, the actual occurrence of reverse rotation is detected at a relatively early stage after the occurrence. This is because a change of the state of discrepancy due to reverse rotation of the engine occurs at an early stage after the actual reverse rotation occurs. However, since this configuration for detecting reverse rotation requires two crank position sensors, the installation of an additional crank position sensor is inevitably troublesome and costly.
Although the occurrence of reverse rotation is detected at an early stage after the actual occurrence, there is a time lag between the actual occurrence and the detection. Thus, in a period corresponding to the time lag, the above shown measure cannot be taken. That is, the implementation of the measure is delayed due to the time lag. As a result, a discrepancy corresponding to the delay of the implementation remains between the counter and the actual crank angle even after implementing the measure. Accordingly, it is difficult to match the value of the counter at the time of stopping of the crankshaft with the actual crank angle.
Then, the counter value that does not correspond to the actual crank angle at the time of stopping of the crankshaft is stored and used as the initial value of the counter in the subsequent starting of the engine. Accordingly, the crank angle acquired based on the counter after initiating the starting of the engine will have an erroneous value. As a result, the first fuel injection and ignition after initiating the starting of the engine cannot be executed at an appropriate time (crank angle). The starting performance of the engine therefore cannot be improved.